package com.mooneros.study.designpattern.singleton;

/**
 * 饱汉单例模式
 * @author mac
 */
public class Singleton {

    private Singleton() {
    }

    public static Singleton singleton;

    /**
     */
    public static synchronized Singleton get() {
//        if(singleton == null) {
//            singleton = new Singleton();
//        }
        return singleton;
    }

}
